
def eat_self_help():
    # 穿好衣服
    # 骑车
    # 入场
    # 取餐
    # 吃
    # 退席

    pass

print() # python 内置的函数
eat_self_help()
eat_self_help()

# 对象，有属性，和操作
# 类和对象



# 定义了一个类
class People:
    def __init__(self, username, age):
        self.username = username
        self.age = age

    def say(self, msg):
        print(f'Hi:{msg}')

user1 = People('ku1', 10)
user2 = People('ku2', 20)
user3 = People('ku3', 30)

print(user1.username)

class Animal:
    def __init__(self, type, alias):
        self.type = type
        self.alias = alias

dog = Animal('dog', 'xiaohua') # dog 是一个对象，或者说是Animal这个类的一个实例
mao = Animal('mao', 'xiaomao')

# 相同层级的代码必须要有相同的缩进
class User:
    def __init__(self, username, password, age, phone, email):
        print('我在构造你呢')
        self.username = username
        self.password = password
        self.age = age
        self.phone = phone
        self.email = email

zhanshan = User('zhanshan', '123456', 20, 123943903, 'zhanshan@qq.com')
# lisi = User('lishi', '88888888', 10, 48923432, 'test@qq.com')

## __init__()叫构造函数
print(zhanshan.email)
print(zhanshan.username)



